
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="images/favicon.ico">

    <title>Signin Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="stylesheets/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <script type="text/javascript" src="javascripts/jquery.js"></script>
    <script type="text/javascript" src="javascripts/bootstrap.min.js"></script>
    <style type="text/css">
        body{
            background-color: #00FF99;
        }
    </style>

</head>

<body>

<div class="container" style="width: 500px; height:500px;margin-top: 50px;background-color: #f5f5f5">
    <form class="form-signin" role="form" method="post" >
        <fieldset>
            <legend>用户登陆</legend>
            <%- message %>
            <h2 class="form-signin-heading" id="message">Please sign in</h2>
            <input type="text" class="form-control" placeholder="输入用户名" required autofocus name="username" id="usename" onblur="checkuser()"><br/>
            <input type="password" class="form-control" placeholder="输入密码" required   name="password">
            <label class="checkbox">
                <input type="checkbox" value="remember-me"> Remember me
            </label>
            <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
        </fieldset>
    </form>

</div> <!-- /container -->

<script type="text/javascript">

     function checkuser(){
         var userName = $("#usename").val();

         $.ajax({
             async:true,
             data:{userName:userName},
             url:"/checkuser",
             dataType:"json",
             type:"post",
             success:function(data){

             }
         })
     };


</script>
</body>
</html>